<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>商户驳回查询</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <!-- 当前页面样式 -->
    <link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
    <!-- 当前页面样式 END -->
    <script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
    <script type="text/javascript">
    function checkSubmit(){
		var startingDate = $.trim($("#startingDate").val());
		var endDate = $.trim($("#endDate").val());
		
		
		if(!startingDate || !endDate ){
			alert("请选择时间范围");
			return false;
		}
		
		$("#queryRejectedListForm").attr("action","<%=basePath%>/windControllSta/queryMerinfoRejectedList.ct");
		$("#queryRejectedListForm").submit();
	}
    
    function exportSubmit(){
    	var startingDate = $.trim($("#startingDate").val());
		var endDate = $.trim($("#endDate").val());
		
		
		if(!startingDate || !endDate ){
			alert("请选择时间范围");
			return false;
		}
		
		$("#queryRejectedListForm").attr("action","<%=basePath%>/windControllSta/exportMerinfoRejectedList.ct");
		$("#queryRejectedListForm").submit();
	}
	
	function isRejectDetail(str){
		$("#queryRejectedListForm").attr("action","<%=basePath%>/mer/addMerCompleteJsp.ct?merinfo.id="+str+"&mchtRejectType=2");
		$("#queryRejectedListForm").submit();
	}
	
</script>
</head>
<body>
<s:form id="queryRejectedListForm" action="" method="post" theme="simple">
<table class="tb">
    <tbody>
        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
        </tr>

        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h3">商户驳回查询</div></td>
        </tr>

        <tr class="tb-line">
        	<td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">日期范围：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-mini"><s:textfield id="startingDate"  name="searchCondition.startingDate" 
                onfocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" 
                /></label>-<label class="tb-input-mini"><s:textfield id="endDate"  name="searchCondition.endDate" 
                onfocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" 
                /></label><code class="asterisk">*</code>
            </td>
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">商户号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="merinfoNo" name="searchCondition.merinfoNo" cssClass="queryWidth" /></label>
            </td>
         </tr>
         <tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">商户名称：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="merinfoName" name="searchCondition.merinfoName" cssClass="queryWidth" /></label>
            </td>
         </tr>

        <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="4">
                <label class="tb-input-submit">
                    <input type="button" value="查   询" onclick="return checkSubmit();" />
                </label>
                <label class="tb-input-submit">
                    <s:if 
					 test="#request.auditList != null && #request.auditList.size>0">
					   		<input id="szPower" type="button"
							value="导 出" onclick="return exportSubmit();"/>
					   
					</s:if>
					<s:else>
					 	<input id="szPower" disabled="disabled" value="导  出" type="button" /> 
					</s:else>
                </label>
            </td>
        </tr>
        <s:if test="#request.auditList != null && #request.auditList.size>0">
					<tr class="tb-line">
						<td class="tb-td paging"  align="left" colspan="4"> <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/windControllSta/queryMerinfoRejectedList.ct?currentPage=" />

						</td>
					</tr>
	</s:if>
    </tbody>
    
</table>

<div class="big-tb">
    <table class="tb" style="width: 100%;">
        <thead>
            <tr class="tb-line">
                <th class="tb-th" colspan="13">商户驳回查询列表</th>
            </tr>
            <tr class="tb-line bg-gray">
                		<th class="tb-th">日期</th>
						<th class="tb-th">商户号</th>
						<th class="tb-th">所属机构</th>
						<th class="tb-th">直属代理商</th>
						<th class="tb-th">所属分公司（大区）</th>
						<th class="tb-th">一级代理商</th>
						<th class="tb-th">商户简称</th>
						<th class="tb-th">商户全称</th>
						<th class="tb-th">业务联系人</th>
						<th class="tb-th">业务联系人电话</th>
						<th class="tb-th">审核人</th>
						<th class="tb-th">审核意见</th>
            </tr>
        </thead>
        <tbody>
			<s:iterator value="#request.auditList" status="stat" id="tft">
							<tr  class="tb-line"  >
					        <td class="tb-td">
							<s:property value="#tft.createDate"/>
							</td>
							<td class="tb-td">
							<a href="javascript:isRejectDetail(<s:property value="#tft.obj_Audited"/>)"><s:property value="#tft.obj_Audited"/></a>
							</td>
							<td class="tb-td">
							<s:property value="#tft.bankBelongCd"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.agentName"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.branchcompy"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.oneagent"/>
							</td>
							<td class="tb-td">
							 <s:property value="#tft.merinfoName"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.shortName"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.contanctName"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.contanctPh"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.auditorName"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.result_detail"/>
							</td>
						    </tr>
						</s:iterator>
        </tbody>
    </table>
</div>
</s:form>

<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>